#ifndef __OTA_VERSION_H_
#define __OTA_VERSION_H_

#include "ota_http_curl.h"
#include "stdio.h"
#include "unistd.h"
#include "cJSON.h"
#include <string.h>
#include <openssl/sha.h>
#include <sys/reboot.h>


#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_PATCH 1

#define VERSION_INFO_URL "http://192.168.43.70:8000/fileinfo.json"
#define VERSION_INFO_DOWNLOAD_URL "http://192.168.43.70:8000/download/gateway"
//#define VERSION_INFO_FILE_PATH "/home/atguigu/gateway.update"

//#define VERSION_INFO_DOWNLOAD_URL "http://192.168.11.1:8000/download/test.txt"
#define VERSION_INFO_FILE_PATH "/root/gateway.update"

/**
 * @brief 检查并更新版本
 */
void  ota_version_check_and_update(void);


/**
 * @brief 每日检查
 */
void ota_version_daily_check(void);


/**
 * @brief 打印当前本地版本号
 */
void ota_version_print(void);







#endif // __OTA_VERSION_H_
